<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 生成一个0到10的随机数
        let getRandom = Math.floor(Math.random() * 11);
        // 生成一个3到10的随机数
        // let b = Math.floor(Math.random() * (10 - 3 + 1) + 3);
        let b = Math.floor(Math.random() * (10 - 3 + 1)) + 3;
        // 生成一个N到M的随机数
        // let c = Math.floor(Math.random() * (M - N + 1) + N);
        // let c = Math.floor(Math.random() * (M - N + 1) ) + N;
        console.log(b);
    </script>
</body>

</html>